package cn.imvc.app.models;

import java.util.Collection;
import java.util.LinkedHashMap;

import org.springframework.data.domain.Page;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.web.util.matcher.RequestMatcher;

import cn.imvc.app.entities.Goods;
import cn.imvc.app.entities.GoodsReviews;
import cn.imvc.data.domain.ViewRequest;

public interface GoodsReviewsModel {
LinkedHashMap<RequestMatcher, Collection<ConfigAttribute>> getRequestMap();
	
	Page<GoodsReviews> find(ViewRequest viewRequest);
	
	GoodsReviews get(int id);

	GoodsReviews save(GoodsReviews goodsReviews);
	
	GoodsReviews update(GoodsReviews goodsReviews);

	void delete(int id);

	void deleteBatch(int[] ids);
	
	void deleteByGoods(Goods goods);
	
	Page<Object[]> findObjectPage(ViewRequest viewRequest);
	
	void saveReviews(Goods goods);
	
	void updateReviews(GoodsReviews goodsReviews);
}
